// Copyright (c) 2008, 
// Marc Speck, http://www.faindu.com
// All Rights Reserved. The following is Source Code and is subject to all restrictions 
// on such code as contained in the license accompanying this product.
package com.faindu.editImage.base
{
	import flash.display.Bitmap;
	

/**
 * Interface for ImageLoader.
 */
public interface IImageLoader
{
	//----------------------------------
	//  url
	//----------------------------------	
	/**
	 * This is the url of the image. Only image of the format jpg, png or gif 
	 * are allowed. If <code>url</code> is set, <code>ImageLoader</code> immediatelly 
	 * tries to load the image.
	 * <p>The alternative to assigning an URL is handing in directly a bimap 
	 * into <code>showBitmap</code>.</p>
	 * 
	 * @see #showBitmap
	 */	
	function get url(): String
	function set url( value:String ): void
	
	//----------------------------------
	//  image
	//----------------------------------		
	/**
	 * This is the original bitmap of the image.
	 */
	function get image(): Bitmap

	//----------------------------------
	//  showBitmap
	//----------------------------------
	/**
	 * Instead of assigning an url, a bitmap can be used in EditImage.
	 * 
	 * @param bitmap The bitmap to display in EditImage
	 * @param url Optionally, you can provide the URL of the image. The <code>url</code>
	 * is not used for loading an image, the value is only stored. 
	 * 
	 * @see #url
	 */
	function showBitmap( bitmap:Bitmap, url:String=null ): void
	
}
}